﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Entity.PagedList<Entity.Car_Rental.News>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        新闻列表</h2>
    <table  width="100%" cellpadding="3" cellspacing="1" id="listTable" class="liebiao_table">
        <tr>
            <th>
            </th>
            <th>
                标题
            </th>
            <th>
                内容介绍
            </th>
            <th>
                状态
            </th>
            <th>
                显示日期
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%: Html.ActionLink("编辑", "Edit", new { id=item.NewsID }) %>
                |
                <%: Html.ActionLink("查看", "Details", new { id=item.NewsID })%>
                |
                <%: Html.ActionLink("删除", "Delete", new { id=item.NewsID })%>
            </td>
            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.InfoSummary %>
            </td>
            <td>
                <%: ((Entity.CommonEnums.Status)item.Status).GetDescription() %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.DisplayDate) %>
            </td>
        </tr>
        <% } %>
        <tr>
            <td colspan="5">
                <%=Html.Pager(Model) %>
            </td>
        </tr>
    </tabl>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
